﻿@model List<IdentityServer4.EntityFramework.Entities.ApiResource>

<div class="row">

    <div class="col-12">
        <h2>Api Resources</h2>
    </div>

    <div class="col-12">
        <a asp-action="Add" class="btn btn-outline-primary mb-3"><span class="oi oi-plus"></span> Add Resource</a>
    </div>

    <div class="col-12">
        @*@await Html.PartialAsync("Common/Search", new Search() { Action = "ApiResources", Controller = "Configuration" })*@
    </div>
</div>
<div class="row">
    <div class="col-12">
        <div class="table-responsive">
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th></th>
                        <th>Name</th>
                        <th>Display Name</th>
                        <th>Description</th>
                        <th></th>
                    </tr>
                </thead>

                <tbody>
                    @foreach (var api in Model)
                    {
                    <tr>
                        <th scope="row"><a class="btn btn-primary" asp-action="Edit" asp-route-id="@api.Id">Edit</a></th>
                        <td>@api.Name</td>
                        <td>@api.DisplayName</td>
                        <td>@api.Description</td>
                        <td>
                            <a class="btn btn-danger" asp-action="Delete" asp-route-id="@api.Id"><span class="oi oi-x"></span></a>
                        </td>
                    </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-12">
        @*@await Html.PartialAsync("Common/Pager", new Pager { Action = "ApiResources", PageSize = Model.PageSize, TotalCount = Model.TotalCount, EnableSearch = true, Search = @ViewBag.Search })*@
    </div>
</div>